<template>
  <el-dialog title="视图浏览" v-model="visible" width="80%" destroy-on-close @closed="$emit('closed')">
    
	<pre style="word-break: break-all; white-space: pre-wrap; ">{{ content }}</pre>

  </el-dialog>
</template>

<script>
    import setting from './setting'
	export default {
		emits: ['success', 'closed'],
		components: {
		},
		data() {
			return {
				mode: "add",
				visible: false,
				isSaveing: false,
				content: "Loading ... ",
				tables: null,
				views: null
			}
		},
		mounted() {
		},
		methods: {
			//显示
			open(){
				this.visible = true;
				return this
			},
			//
			async load(){
				let d = { 
					table: this.tables,
					view: this.views
				}
				this.content = await setting.api.view.get(d);
			},
			//表单提交方法
			submit(){			
			},
			//表单注入数据
			setData(tables,views){
				this.tables = tables
				this.views = views
				this.load()
			}
		}
	}
</script>

<style>
</style>
